<?php

Route::get('cas','CasLoginController@cas');

Route::group(['middleware' => 'checkLogin'],function (){

    //学生模块
    Route::get('/','IndexController@index');
    Route::get('book','IndexController@getBooks');
    Route::put('lendBook/{id}','IndexController@lendBook');

    //个人中心模块
    Route::get('person','PersonController@person');
    Route::delete('returnBook/{id}','PersonController@returnBook');
    Route::put('addTime/{id}','PersonController@addTime');

    //管理员模块
    Route::get('admin','AdminController@index');
    Route::get('adminGetbook','AdminController@getBooks');
    Route::post('book','AdminController@createBook');
    Route::delete('book/{id}','AdminController@deleteBook');
    Route::get('updateIndex/{id}','AdminController@updateBookIndex');
    Route::put('book/{id}','AdminController@updateBook');
});
